<div class="container-fluid" ng-controller="AgentCreateSubordinateController">
    <form name="createSubordinateForm" novalidate="novalidate">
        <div class="form-group">
            <label>用户类型</label>
            <div class="radio">
                <label><input type="radio" id="usertype_agent" name="usertype" ng-model="createsubordinate.usertype" ng-checked="createsubordinate.usertype=='subordinate'" value="1">代理</label>
                &nbsp;&nbsp;
                <label><input type="radio" id="usertype_agent" name="usertype" ng-model="createsubordinate.usertype" ng-checked="createsubordinate.usertype=='user'" value="2">用户</label>
            </div>
        </div>
        <div class="form-group">
            <label for="profit_ratio">返点</label>
            <select class="form-control" id="profit_ratio" name="profit_ratio" ng-model="createsubordinate.profit_ratio" ng-options="pr.name for pr in createsubordinate.prList" required>
                <option value="">选择返点</option>
            </select>
            <div  ng-show="createSubordinateForm.profit_ratio.$error.required" class="form-input-error">返点必须填写！</div>
        </div>
        <button  class="btn btn-default"  ng-disabled="createSubordinateForm.$invalid"  ng-click="createsubordinate.popularize()">生成推广链接</button>


        <div style="margin-top: 20px" ng-show="createsubordinate.generated?true:false">
            <table class="table table-hover data_table">
                <tr>
                    <td>链接</td>
                    <td>{{createsubordinate.popularize.popula_url }}</td>
                </tr>
                <tr>
                    <td>二维码</td>
                    <td><img src="{{createsubordinate.popularize.popula_qrcode_url}}" alt="二维码"/></td>
                </tr>
            </table>
            <span style="color: yellow">{{createsubordinate.popularizeUrl}}</span>
        </div>
    </form>
</div>